package edu.scau.ojforwarder.bean;

public enum  NowcoderError implements IError {
    SUCCESS(0, "成功！"),

    //查询错误
    NO_SUCH_SUBMISSION(1001, "submissionId错误，没有这个提交记录！"),

    //提交错误
    LOGIN_FAILED(2001, "登录失败，账户或密码不正确！"),
    CONNECTION_ERROR(2002, "连接牛客网服务器失败！"),
    NOT_LOGGED_ERROR(2003, "登录成功,但仍然提示未登录！"),
    NO_SUCH_PROBLEM(2004, "没有这个比赛，或没有这个题目，或没有权限！"),
    OTHER_SUBMIT_EROOR(2005, "提交失败，未知错误！"),

    UNKNOWN_ERROR(3001, "未知错误。"),
    LOGIN_UNKONWN_ERROR(3002, "登录失败， 出现未知错误。");

    private int code;
    private String msg;

    NowcoderError(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    @Override
    public int getCode() {
        return code;
    }

    @Override
    public String getMsg() {
        return msg;
    }
}
